{% load static %}
 
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>{% block title %}{% endblock %}</title>
 
    <!-- Bootstrap -->
    <link href="{% static 'bootstrap-3.3.7-dist/css/bootstrap.min.css' %}" rel="stylesheet">
 
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        .header{
            background-color:red;
            height:50px;
            width:100%;
            position:absolute;
            top:0;
        }
        .main{
            background-image: url("/static/media/bg.jpg");
            background-repeat: no-repeat;
	        background-position: center center;
            background-attachment: fixed;

	        background-size: 100% 100%;
            overflow: auto;
            width:100%;
            position:absolute;
            top:50px;
            bottom:70px;
            height:auto;
        }
        .footer{
            background-color: #979797;
            height:70px;
            width:100%;
            position:absolute;
            bottom:0;
        }
    </style>
  </head>
  <body>

    <nav class="navbar navbar-default">
      <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <a class="navbar-brand" href="{% url 'AppStudent:student_list' %}">学生信息</a>
        </div>
		<div class="navbar-header">
          <a class="navbar-brand" href="/show_page/1">教师信息</a>
        </div>
		<div class="navbar-header">
          <a class="navbar-brand" href="/show_page/1">班级级信息</a>
        </div>
        <div class="navbar-header">
		<div class="navbar-header">
          <a class="navbar-brand" href="/show_page/1">成绩信息</a>
        </div>
          <a class="navbar-brand" href="{% url 'blog:article_list' %}">学校博客</a>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="my-nav">
            <ul class="nav navbar-nav navbar-right">
                {% if  request.session.is_login %}
                    <li class="dropdown">
                        <a href="javascript:;" style="padding:5px;" data-toggle="dropdown">
                            <img src="{{ MEDIA_URL }}{{ user.image }}" width="40" height="40">&nbsp;
                            {{ user.username }}
                            <span class="badge" style="background-color: #3e8f3e;">{{ user.au }}</span>
                        </a>
                        <ul class="dropdown-menu navbar-right">
                            <li>
                                <a href="{% url 'blog:article_create' %}" >
                                    <span class="glyphicon glyphicon-user"></span>
                                    发表文章
                                </a>
                            </li>
                            <li>
                                <a href="{% url 'AppLogin:changeimage' %}" >
                                    <span class="glyphicon glyphicon-user"></span>
                                    更改头像
                                </a>
                            </li>
                            <li>
                                <a href="{% url 'AppLogin:changepassword' %}" >
                                    <span class="glyphicon glyphicon-user"></span>
                                    密码修改
                                </a>
                            </li>
                            <li>
                                <a href="{% url 'AppLogin:logout' %}">
                                    <span class="glyphicon glyphicon-log-out"></span>
                                    退出
                                </a>
                            </li>
                        </ul>
                    </li>
                {%else%}
                    <li>
                        <a href="{% url 'AppLogin:login' %}" id="nav-login" data-toggle="modal">登陆</a>
                    </li>
                    <li>
                        <a href="{% url 'AppLogin:register' %}" id="nav-register" data-toggle="modal">注册</a>
                    </li>
                {% endif %}
            </ul>
        </div><!-- /.navbar-collapse -->
      </div><!-- /.container-fluid -->
    </nav>
  <div class="main">
    {% block content %}

    {% endblock %}
  </div>
  <div class="footer" align="center">
            <p>Copyright © 2020 WjdBob </p>
            <ul>
               <li>海南龙桥学校信息中心 |联系电话：13178930655 |联系邮箱：313464187@qq.com</li>
            </ul>
  </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="{% static 'js/jquery-3.2.1.js' %}"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="{% static 'bootstrap-3.3.7-dist/js/bootstrap.min.js' %}"></script>
  </body>
</html>
